package www.sofn.com.sys.resource;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import www.sofn.com.domain.R;
import www.sofn.com.domain.vo.SelectTreeVO;

import java.util.List;

@RestController
@RequestMapping("sys_resources")
@Tag(name = "系统资源")
public class SysResourceController {
    @Resource
    private SysResourceService sysResourceService;

    @Operation(summary = "资源树形机构")
    @GetMapping("tree_resources")
    public R<List<SelectTreeVO>> treeResources() {
        //获取资源
        return R.ok(sysResourceService.findSysResources());
    }

}
